import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  }
  ,
  {
    path: '/ts',
    name: 'ts',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/TsViiew.vue')
  }
  ,
  {
    path: '/bq',
    name: 'bq',
    component: () => import('../views/BqView.vue'), children: [
      {
        path: '',
        name: 'ticai',
        component: () => import('../components/TiCaiView.vue')
      },
      {
        path: '/bq/fengge',
        name: 'fengge',
        component: () => import('../components/FengGeView.vue')
      },
      {
        path: '/bq/shebei',
        name: 'shebei',
        component: () => import('../components/SheBeiView.vue')
      },
      {
        path: '/bq/diqu',
        name: 'diqu',
        component: () => import('../components/DiQuView.vue')
      },

    ]
  }
  ,
  {
    path: '/sss',
    name: 'sss',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/SheYingView.vue')
  }
  ,
  {
    path: '/qy',
    name: 'qy',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/QyView.vue')
  }
  ,
  {
    path: '/active',
    name: 'active',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/ActiveView.vue')
  }
  ,
  {
    path: '/sky',
    name: 'sky',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/SkyView.vue'),
    children:[
        {
          path: '/sky/prize',
          component: () => import('../components/prize.vue')
        },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
